package com.example.taxfloatproject20240926.ui.room;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;


import com.example.taxfloatproject20240926.ui.bean.CallBean;

import java.util.List;

import io.reactivex.Completable;
import io.reactivex.Flowable;

@Dao
public interface CallDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    Completable insert(CallBean calledBeans);
    @Delete
    Completable delete(CallBean calledBean);
    @Query("SELECT * FROM CallBean order by time desc")
    Flowable<List<CallBean>> getCallList();
    @Query("delete from CallBean")
    Completable delete();
}
